function chkLogin(){
	var adminUser = $("#adminUser").val();
	var password = $("#password").val();
	var verifyCode = $("#verifyCode").val();
	password = JFT.encrypt(password);
	$("#password").val(password);
	var param = "adminUser="+adminUser+"&password="+password+"&verifyCode="+verifyCode;
	beginPageLoading();
	ajaxPost("loginAction.do?method=login", param, function(data){
		endPageLoading();
		if(data["resultCode"] == 1){
			alert("输入的账号错误！");
			$("#adminUser,#password,#verifyCode").val("");
			$("#adminUser").focus();
			$("#verifyImg").trigger("click");
			return;
		}else if(data["resultCode"] == 2){
			alert("当前登录用户账号已经被锁定，请联系管理员！");
			return;
		}else if(data["resultCode"] == 3){
			alert("输入的登录密码错误！");
			$("#password,#verifyCode").val("");
			$("#password").focus();
			$("#verifyImg").trigger("click");
			return;
		}else if(data["resultCode"] == 4){
			alert("账号和密码不能为空！");
			return;
		}else if(data["resultCode"] == 5){
			alert("验证码错误！");
			$("#password,#verifyCode").val("");
			$("#password").focus();
			$("#verifyImg").trigger("click");
			return;
		}
		location.href = "adminAction.do?method=manager";
	});
	return false;
}

$(function(){
	$("#adminUser").focus();
	//随机图片
	$("#verifyImg").click(function(){
		$(this).attr("src", "?method=image&code="+Math.random());
	});
	
	$(document).keypress(function(evt){
		if(evt.which==13){
			$("#loginBtn").trigger("click");
			return false;
		}
		return true;
	});
});


	